package com.happle.gcmclient.config;

public final class Constants {

	// This is the project id generated from the Google console when defined a
	// Google APIs project.
	public static final String SENDER_ID = "435848802389";
	public static final String PROJECT_ID = "r567pispopd";
	

	// ======== WEBSERVICE URL=========== //
    //my computer
    public static final String API_DOMAIN = "http://happle.hinamis.com/";
    //public static final String API_DOMAIN ="http://localhost/";
	//public static final String API_DOMAIN ="http://stranas.zapto.org/";
   
	public static final String URL_SEND_MESSAGE =API_DOMAIN+ "api.svc/send_message_async/";
    public static final String URL_REGISTER_CHANGESTATUS = API_DOMAIN+ "api.svc/registration_changestatus/";
    public static final String URL_UNREGISTER = API_DOMAIN + "api.svc/unregister_async/";
    public static final String URL_CHANGE_STATUS = API_DOMAIN+ "api.svc/change_status_async/";
    public static final String URL_UPDATE_LANGUAGE = API_DOMAIN + "api.svc/update_language_async/";
    public static final String URL_UPDATE_CONVERSATION =API_DOMAIN +  "api.svc/update_conversation_async/";
    public static final String URL_DELETE_CONVERSATION = API_DOMAIN + "api.svc/delete_conversation_async/";
    public static final String URL_GET_MORE_CONVERSATIONS = API_DOMAIN + "api.svc/change_status/";
    public static final String URL_LOGIN = API_DOMAIN+ "Registration.asmx/login/";
    public static final String URL_TEST = API_DOMAIN+ "api.svc/json/GetMessageFormAndroid/";
    public static final String URL_SYNC_DATA = API_DOMAIN+ "api.svc/data_sync_localtoserver/";

    
	// ============ MESSAGES ================= //
	public static final String FIELD_MESSAGE = "MSG";
	public static final String KEY_LANGUAGE = "LANGUAGE";
	public static final String FIELD_REQUEST_CODE = "REQUEST_CODE";
	public static final String FIELD_REGISTER_ID = "REGISTER_ID ";
	public static final String FIELD_NEED_UPADATE_LIST_CONVERSATION = "NEED_UPADATE_LIST_CONVERSATION ";
	public static final int MESSAGE_ROOT = 0;
	public static final int REQUEST_CODE_ADD = 0;
	public static final int REQUEST_CODE_UPD = 1;
    public static final int REQUEST_CODE_NOTIF = 2;
    public static final int WAKELOCKER_DURATION = 1000;
    public static final String NEW_MESSAGE_NAME = "NEW_MSG";
    public static final String KEY_MESSAGE_OBJECT = "MESSAGE_OBJECT";
    public static final int DOWNLOAD_MSG_PACKAGE = 10;
    public static final String NOTIF_TITLE = "Happle";
    public static final String PUSH_FROM_CONVERSATION = "PUSH_FROM_CONVERSATION";
    public static final String REQUEST_CODE = "REQUEST_CODE";
    public static final int NO_LANGUAGE_CORRESPONDENT = -2;

	// =============== DB ==================== //
	public static final String DATABASE_NAME = "happle.db";
	public static final String TBL_CONVERSATIONS = "tbl_conversations";
    public static final String TBL_LANGUAGES = "tbl_languages";
    public static final String TBL_CONVERSATIONS_NOT_SYNC = "tbl_conversations_not_sync";
	public static final int DATABASE_VERSION = 2;
	
	public static final String MSG_ID_LOCAL = "msg_id_local";
	public static final String WAVE_ID = "wave_id";
	public static final String IS_OWNER = "is_owner";
	public static final String MESSAGE = "message";
	public static final String LNG_ID = "lng_id";
	public static final String DATETIME = "datetime";
	public static final String MSG_STATUS = "msg_status";
	public static final String MSG_ORDER = "msg_order";
	public static final String IS_SENT = "is_sent";

    public static final boolean LNG_TBL_FILLED = false;
    public static final String LNG_TBL_FILLED_NAME = "LNG_TBL_FILLED";

    // =========== DB PARAMETERS ============= //
    // MESSAGES
    public static final String user_data_p = "user_data";
    public static final String message_obj_p = "message_obj";
    public static final String registration_id_p = "registration_id";
    public static final String phone_type_p = "phone_type";
    public static final String username_p = "username";
    public static final String user_pwd_p = "user_pwd";
    public static final String user_status_p = "user_status";
    public static final String msg_id_local_p = "msg_id_local";
    public static final String wave_id_p = "wave_id";
    public static final String msg_order_p = "msg_order";
    public static final String language_p = "language";
    public static final String lng_id_p = "lng_id";
    public static final String user_id_p = "user_id";
    public static final String message_p = "message";
    public static final String datetime_p = "datetime";
    public static final String msg_status_p = "msg_status";
    public static final String conv_status_p = "conv_status";
    public static final String msgs_count_p = "msgs_count";
    public static final String is_owner_p = "is_owner";
    public static final String is_sent_p = "is_sent";
    public static final String first_msg_id_p = "first_msg_id";
    public static final String first_message_p = "first_message";
    public static final String conv_status_server_p = "conv_status_server";
    public static final String conv_closed_is_sent_p = "conv_closed_is_sent";
    public static final String has_new_messages_p = "has_new_messages";
    public static final String is_new_p = "is_new";
    // LANGUAGES
    public static final String lng_name_p = "lng_name";
    public static final String is_marked_p = "is_marked";
	// ============ SETTINGS ================= //
	public static final String PHONE_TYPE = "1"; // android - 1, ios - 2, webapp - 3, unknown - 0
	public static final String SOUND_ON = "SOUND_ON"; // ON - 1, OFF - 0
    public static final String VIBRATION_ON = "VIBRATION_ON"; // ON - 1, OFF - 0
    public static final String WAKELOCKER_ON = "WAKELOCKER_ON"; // ON - 1, OFF - 0

	// ============ FILE NAMES =============== //
	public static final String PREFERENCES_FILENAME = "Preferences";

	// ============ STATUSES ============ //
	
	public static final int STATUS_ON = 1; // user is online
	public static final int STATUS_OFF = 0; // user is off-line
    public static final int STATUS_INVISIBLE = 2; // user is invisible - do not disturb
    public static final int STATUS_UNREGISTERED = -1; // user is unregistered
	public static final int SUCCESS = 1;
	public static final int FAILED = -1;
	public static final int MSG_STATUS_ACTIVE = 1; // 1 - active, 0 - closed, -1 deleted
	public static final int MSG_STATUS_CLOSED = 0;
    public static final int MSG_STATUS_DELETED = -1;
    public static final String IS_ONLINE = "IS_ONLINE";
    public static final int HAS_MORE_CONVERSATIONS = 1;
    // ============= UTIL ============= //
    public static final String ADD_LNG_BTN = "Other language";
    public static final int SYNC_INTERVAL = 60 * 60 * 1000;
    public static final int SYNC_INTERVAL_DELAY = 5000;
	// ============= TEMP ============= //
	public static final String LANGUAGE_ID = "EN";

	// ============ FILTER ACTION =========== //
	
	public static final String ACTION_ON_REGISTERED = "com.happle.gcmclient.ON_REGISTERED";
	public static final String ACTION_ON_NEW_MESSAGE = "com.happle.gcmclient.ON_NEW_COMMENT";

    // ============ ACTIVITY NAMES =========== //
    public static final String MESSAGE_LIST_ACTIVITY_FULL_PATH = "com.happle.gcmclient/com.happle.gcmclient.MessageListActivity";
    public static final String CONVERSATION_LIST_ACTIVITY_FULL_PATH = "com.happle.gcmclient/com.happle.gcmclient.ConversationActivity";
    public static final String MAIN_ACTIVITY_FULL_PATH = "com.happle.gcmclient/com.happle.gcmclient.MainActivity";

    // ============ MENU =========== //
    public static final int MENU_DELETE_CONVERSATION = 1001;
    public static final int MENU_CLOSE_CONVERSATION = 1002;

    // ======== TITLE IMAGES NUMBERS ====== //
    public static final int TITLE_EMPTY_IMAGE_NUM = 0;
    public static final int TITLE_CONVERSATION_IMAGE_NUM = 1;
    public static final int  TITLE_MESSAGESLIST_IMAGE_NUM = 2;
    public static final int TITLE_SETTINGS_IMAGE_NUM = 3;
}
